<?php
// $Id$

/**
 * @file
 * Default theme implementation of a Ventrilo server's status block.
 *
 * Available variables:
 * - $server - An array containing server information. Possible fields include:
 *   'name', 'comment', 'authmode', 'maxclients', 'clientcount', and 'uptime'.
 * - $view - Formatted output of the channels and clients on the server when in
 *   normal display mode, or basic server information otherwise.
 */
?>
<div class="ventstatus-server">
<?php if (isset($server['error'])): ?>
  <div class="ventstatus-server-error"><?php print $server['error']; ?></div>
<?php else: ?>
  <h4 title="<?php print t('Uptime: @time', array('@time' => ventstatus_format_interval($server['uptime'], 4))); ?>"><?php print $server['name']; ?></h4>
  <?php if ($server['comment']): ?><small><?php print $server['comment']; ?></small><?php endif; ?>
<?php if (!empty($view)): ?>
  <?php print $view; ?>
<?php endif; ?>
  <small><?php print t('Users: ') . $server['clientcount'] . '/' . $server['maxclients']; ?></small>
<?php endif; ?>
</div>
